package com.dynamic.datasource.demo.controller;


import com.dynamic.datasource.demo.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 产品信息表 前端控制器
 * </p>
 *
 * @author hh
 * @since 2023-02-04
 */
@RestController
@RequestMapping("/demo/product")
public class ProductController {

    @Autowired
    private IProductService productService;

    @GetMapping("get")
    public String get() {
        System.out.println(productService.selectFromMaster());
        System.out.println(productService.selectFromSlave1());
        System.out.println(productService.selectFromSlave2());
        return "success";
    }

}
